function G = parameter_matrix(length, change_point_pos, sample_freq, first_freq, second_freq)

% function G = parameter_matrix(length, change_point_pos, sample_freq first_freq,
% 2nd_freq)
%
% Returns the parameter space matrix G

G = zeros(length,2);

for i = 1:change_point_pos
    G(i,1) = cos((first_freq*(2*pi/sample_freq))*i);
    G(i,2) = sin((first_freq*(2*pi/sample_freq))*i);
end

for j = (change_point_pos+1):length
    G(j,1) = cos((second_freq*(2*pi/sample_freq))*j);
    G(j,2) = sin((second_freq*(2*pi/sample_freq))*j);
end